package com.flyoil.petromp.apiservice;


import com.flyoil.petromp.base.BaseEntity;
import com.flyoil.petromp.entity.entity_course_detail.CoursePlantDetailEntity;
import com.flyoil.petromp.entity.entity_course_detail.CoursePlantServiceDetailEntity;
import com.flyoil.petromp.entity.entity_course_detail.GoodsDemandDetailEntity;
import com.flyoil.petromp.entity.entity_course_detail.GoodsExamineDetailEntity;
import com.flyoil.petromp.entity.entity_course_detail.GoodsOrderDetailEntity;
import com.flyoil.petromp.entity.entity_course_detail.ServiceDemandDetailEntity;
import com.flyoil.petromp.entity.entity_course_detail.ServiceExamineDetailEntity;
import com.flyoil.petromp.entity.entity_course_detail.ServiceOrderDetailEntity;
import com.flyoil.petromp.entity.entity_course_list.CourseFinanceListEntity;
import com.flyoil.petromp.entity.entity_course_list.CoursePlantListEntity;
import com.flyoil.petromp.entity.entity_course_list.GoodsDemandListEntity;
import com.flyoil.petromp.entity.entity_course_list.GoodsExamineListEntity;
import com.flyoil.petromp.entity.entity_course_list.GoodsOrderListEntity;
import com.flyoil.petromp.entity.entity_course_list.ServiceDemandListEntity;
import com.flyoil.petromp.entity.entity_course_list.ServiceExamineListEntity;
import com.flyoil.petromp.entity.entity_course_list.ServiceOrderListEntity;
import com.flyoil.petromp.entity.entity_course_message.CourseFinanceMessageEntity;
import com.flyoil.petromp.entity.entity_course_message.CoursePlantMessageEntity;
import com.flyoil.petromp.entity.entity_course_message.GoodsDemandMessageEntity;
import com.flyoil.petromp.entity.entity_course_message.GoodsExamineMessageEntity;
import com.flyoil.petromp.entity.entity_course_message.GoodsOrderMessageEntity;
import com.flyoil.petromp.entity.entity_course_message.ServiceDemandMessageEntity;
import com.flyoil.petromp.entity.entity_course_message.ServiceExamineMessageEntity;
import com.flyoil.petromp.entity.entity_course_message.ServiceOrderMessageEntity;
import com.flyoil.petromp.entity.entity_home.BannerListEntity;
import com.flyoil.petromp.entity.entity_home.HomeMatterListEntity;
import com.flyoil.petromp.entity.entity_login.LoginEntity;
import com.flyoil.petromp.entity.entity_matter.MatterNetworkEntity;
import com.flyoil.petromp.entity.entity_me.MyMessageEntity;
import com.flyoil.petromp.entity.entity_me.UserMessageEntity;
import com.flyoil.petromp.entity.entity_me.UserPhoneEntity;
import com.flyoil.petromp.entity.entity_notice.NoticeEntity;
import com.flyoil.petromp.entity.entity_notice.NoticeMessageEntity;
import com.flyoil.petromp.entity.entity_service.ProjectListEntity;
import com.flyoil.petromp.entity.entity_service.ProjectMessageEntity;
import com.flyoil.petromp.entity.entity_service.SupplierListEntity;
import com.flyoil.petromp.entity.entity_service.SupplierMessageEntity;
import com.flyoil.petromp.entity.entity_service.SupplierServiceListEntity;
import com.flyoil.petromp.entity.entity_service.SupplierServiceMessageEntity;
import com.flyoil.petromp.entity.entity_statics.StaticsDataEntity;
import com.flyoil.petromp.entity.entity_statics.StaticsDeptListEntity;
import com.flyoil.petromp.entity.entity_statics.StaticsSupplierListEntity;

import java.util.Map;

import okhttp3.RequestBody;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.PartMap;
import retrofit2.http.Path;
import retrofit2.http.QueryMap;
import rx.Observable;

/**
 * Created by bingju on 2017/2/10.
 */

public interface RetrofitApiSerivce {


    /**
     * 用户登录
     */
    @FormUrlEncoded
    @POST("/login")
    Observable<LoginEntity> login(@FieldMap Map<String, Object> fields);

    /**
     * 用户退出登录
     */
    @GET("/logout")
    Observable<BaseEntity> logout(@QueryMap Map<String, Object> fields);

    /**
     * 获取个人信息接口
     */
    @GET("/user/userInfo")
    Observable<UserMessageEntity> getUserMessage(@QueryMap Map<String, Object> fields);

    /**
     * 修改用户密码
     */
    @FormUrlEncoded
    @POST("/user/resetPassword")
    Observable<BaseEntity> resetPassword(@FieldMap Map<String, Object> fields);

    /**
     * 上传头像
     */
    @Multipart
    @POST("/user/uploadAvatar")
//    @POST("/ditreceivedata/image/uploadImage")
    Observable<UserPhoneEntity> uploadAvatar(@PartMap Map<String, RequestBody> fields);

    /**
     * 上传签名图片
     */
    @Multipart
    @POST("/user/uploadSignature")
    Observable<UserPhoneEntity> uploadSignature(@PartMap Map<String, RequestBody> fields);

    /**
     * 获取我的消息列表
     */
    @GET("/message/page")
    Observable<MyMessageEntity> getMessageList(@QueryMap Map<String, Object> fields);

    /**
     * 删除消息列表
     */
    @FormUrlEncoded
    @POST("/message/delete")
    Observable<MyMessageEntity> deleteMessageList(@FieldMap Map<String, Object> fields);

    /**
     * 获取消息详情信息的接口
     */
    @GET("/message/detail/{id}")
    Observable<BaseEntity> getMessageDetail(@Path("id") int id, @QueryMap Map<String, Object> fields);

    /**
     * 获取公告列表
     */
    @GET("/notice/list")
    Observable<NoticeEntity> getNoticeList(@QueryMap Map<String, Object> fields);

    /**
     * 获取公告详情
     */
    @GET("/notice/detail/{id}")
    Observable<NoticeMessageEntity> getNoticeMessage(@Path("id") int id, @QueryMap Map<String, Object> fields);

    /**
     * 获取物资采购计划单列表
     */
    @GET("/plan")
    Observable<CoursePlantListEntity> getCoursePlanList(@QueryMap Map<String, Object> fields);

    /**
     * 获取物资采购计划单详情
     */
    @GET("/plan/{id}")
    Observable<CoursePlantMessageEntity> getCoursePlanMessage(@Path("id") int id, @QueryMap Map<String, Object> fields);

    /**
     * 获取物资采购计划单计划明细
     */
    @GET("/planItem/{id}")
    Observable<CoursePlantDetailEntity> getCoursePlanDetail(@Path("id") int id, @QueryMap Map<String, Object> fields);

    /**
     * 获取物资采购计划单服务明细
     */
    @GET("/srvPlanItem/{id}")
    Observable<CoursePlantServiceDetailEntity> getCoursePlanServiceDetail(@Path("id") int id, @QueryMap Map<String, Object> fields);

    /**
     * 获取物资采购需求单列表
     */
    @GET("/demand")
    Observable<GoodsDemandListEntity> getCourseGoodsDemandList(@QueryMap Map<String, Object> fields);

    /**
     * 获取物资采购需求单详情
     */
    @GET("/demand/{id}")
    Observable<GoodsDemandMessageEntity> getCourseGoodsDemandMessage(@Path("id") int id, @QueryMap Map<String, Object> fields);

    /**
     * 获取物资采购需求单明细
     */
    @GET("/demandItem/{id}")
    Observable<GoodsDemandDetailEntity> getCourseGoodsDemandDetail(@Path("id") int id, @QueryMap Map<String, Object> fields);

    /**
     * 获取物资采购订单列表
     */
    @GET("/order")
    Observable<GoodsOrderListEntity> getCourseGoodsOrderList(@QueryMap Map<String, Object> fields);

    /**
     * 获取物资采购订单详情
     */
    @GET("/order/{id}")
    Observable<GoodsOrderMessageEntity> getCourseGoodsOrderMessage(@Path("id") int id, @QueryMap Map<String, Object> fields);

    /**
     * 获取物资采购订单明细
     */
    @GET("/orderItem/{id}")
    Observable<GoodsOrderDetailEntity> getCourseGoodsOrderDetail(@Path("id") int id, @QueryMap Map<String, Object> fields);

    /**
     * 获取物资采购验收单列表
     */
    @GET("/petAcceptance")
    Observable<GoodsExamineListEntity> getCourseGoodsExamineList(@QueryMap Map<String, Object> fields);

    /**
     * 获取物资采购验收单详情
     */
    @GET("/petAcceptance/{id}")
    Observable<GoodsExamineMessageEntity> getCourseGoodsExamineMessage(@Path("id") int id, @QueryMap Map<String, Object> fields);

    /**
     * 获取物资采购验收单明细
     */
    @GET("/petAcceptanceItem/{id}")
    Observable<GoodsExamineDetailEntity> getCourseGoodsExamineDetail(@Path("id") int id, @QueryMap Map<String, Object> fields);

    /**
     * 获取服务任务需求单列表
     */
    @GET("/srvReq")
    Observable<ServiceDemandListEntity> getCourseServiceDemandList(@QueryMap Map<String, Object> fields);

    /**
     * 获取服务任务需求单详情
     */
    @GET("/srvReq/{id}")
    Observable<ServiceDemandMessageEntity> getCourseServiceDemandMessage(@Path("id") int id, @QueryMap Map<String, Object> fields);

    /**
     * 获取服务任务需求单明细
     */
    @GET("/srvReqItem/{id}")
    Observable<ServiceDemandDetailEntity> getCourseServiceDemandDetail(@Path("id") int id, @QueryMap Map<String, Object> fields);

    /**
     * 获取服务任务订单列表
     */
    @GET("/srvOrder")
    Observable<ServiceOrderListEntity> getCourseServiceOrderList(@QueryMap Map<String, Object> fields);

    /**
     * 获取服务任务订单详情
     */
    @GET("/srvOrder/{id}")
    Observable<ServiceOrderMessageEntity> getCourseServiceOrderMessage(@Path("id") int id, @QueryMap Map<String, Object> fields);

    /**
     * 获取服务任务订单明细
     */
    @GET("/srvOrderItem/{id}")
    Observable<ServiceOrderDetailEntity> getCourseServiceOrderDetail(@Path("id") int id, @QueryMap Map<String, Object> fields);

    /**
     * 获取服务任务验收单列表
     */
    @GET("/srvAcpt")
    Observable<ServiceExamineListEntity> getCourseServiceExamineList(@QueryMap Map<String, Object> fields);

    /**
     * 获取服务任务验收单详情
     */
    @GET("/srvAcpt/{id}")
    Observable<ServiceExamineMessageEntity> getCourseServiceExamineMessage(@Path("id") int id, @QueryMap Map<String, Object> fields);

    /**
     * 获取服务任务验收单明细
     */
    @GET("/srvAcptItem/{id}")
    Observable<ServiceExamineDetailEntity> getCourseServiceExamineDetail(@Path("id") int id, @QueryMap Map<String, Object> fields);

    /**
     * 获取付款申请单列表
     */
    @GET("/projectPayment")
    Observable<CourseFinanceListEntity> getCourseFinanceList(@QueryMap Map<String, Object> fields);

    /**
     * 获取付款申请单详情
     */
    @GET("/projectPayment/{id}")
    Observable<CourseFinanceMessageEntity> getCourseFinanceMesage(@Path("id") int id, @QueryMap Map<String, Object> fields);

    /**
     * 获取已办事项列表
     */
    @GET("/common/solved")
    Observable<MatterNetworkEntity> getMatterFinishedList(@QueryMap Map<String, Object> fields);

    /**
     * 获取进度追踪的列表
     */
    @GET("/common/track")
    Observable<HomeMatterListEntity> getHomeMatterList(@QueryMap Map<String, Object> fields);

    /**
     * 获取未办事项列表
     */
    @GET("/common/unsolved")
    Observable<MatterNetworkEntity> getMatterUnFinishList(@QueryMap Map<String, Object> fields);

    /**
     * 获取供应商列表
     */
    @GET("/supplier")
    Observable<SupplierListEntity> getSupplierList(@QueryMap Map<String, Object> fields);

    /**
     * 获取供应商详情
     */
    @GET("/supplier/{id}")
    Observable<SupplierMessageEntity> getSupplierMesage(@Path("id") int id, @QueryMap Map<String, Object> fields);

    /**
     * 获取供应商物品列表
     */
    @GET("/material")
    Observable<ProjectListEntity> getSupplierProjectList(@QueryMap Map<String, Object> fields);

    /**
     * 获取供应商物品详情
     */
    @GET("/material/{id}")
    Observable<ProjectMessageEntity> getSupplierProjectMesage(@Path("id") int id, @QueryMap Map<String, Object> fields);

    /**
     * 获取供应商服务列表
     */
    @GET("/services")
    Observable<SupplierServiceListEntity> getSupplierServiceList(@QueryMap Map<String, Object> fields);

    /**
     * 获取供应商服务详情
     */
    @GET("/services/{id}")
    Observable<SupplierServiceMessageEntity> getSupplierServiceMesage(@Path("id") int id, @QueryMap Map<String, Object> fields);


    /**
     * 对单据进行批准的操作
     */
    @FormUrlEncoded
    @POST("/flow/approval/{id}")
    Observable<BaseEntity> setOrderApproval(@Path("id") int id, @FieldMap Map<String, Object> fields);

    /**
     * 对单据进行撤销的操作
     */
    @FormUrlEncoded
    @POST("/flow/cancel/{id}")
    Observable<BaseEntity> setOrderCancel(@Path("id") int id, @FieldMap Map<String, Object> fields);

    /**
     * 对单据进行退回的操作
     */
    @FormUrlEncoded
    @POST("/flow/reject/{id}")
    Observable<BaseEntity> setOrderReject(@Path("id") int id, @FieldMap Map<String, Object> fields);

    /**
     * 获取首页banner图列表
     */
    @GET("/banner")
    Observable<BannerListEntity> getBannerList(@QueryMap Map<String, Object> fields);

    /**
     * 获取部门统计数据的接口
     */
    @GET("/statistics/dept/{type}")
    Observable<StaticsDataEntity> getStatisticsDeptList(@Path("type") String id, @QueryMap Map<String, Object> fields);

    /**
     * 获取供应商统计数据的接口
     */
    @GET("/statistics/supplier/{type}")
    Observable<StaticsDataEntity> getStatisticsSupplierList(@Path("type") String id, @QueryMap Map<String, Object> fields);

    /**
     * 获取统计模块刷选条件的部门列表
     */
    @GET("/dept/list/{companyId}")
    Observable<StaticsDeptListEntity> getStatisticsConditionDeptList(@Path("companyId") int companyId, @QueryMap Map<String, Object> fields);

    /**
     * 获取统计模块刷选条件的供应商列表
     */
    @GET("/supplier/list/simple")
    Observable<StaticsSupplierListEntity> getStatisticsConditionSupplierList(@QueryMap Map<String, Object> fields);
}
